3.218 \(\int \frac{a+b \log (c x^n)}{d+e x^2} \, dx\)

Optimal. Leaf size=105 \[ -\frac{i b n \text{PolyLog}\left (2,-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} \sqrt{e}}+\frac{i b n \text{PolyLog}\left (2,\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} \sqrt{e}}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d} \sqrt{e}} \]

[Out]

(ArcTan[(Sqrt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/(Sqrt[d]*Sqrt[e]) - ((I/2)*b*n*PolyLog[2, ((-I)*Sqrt[e]*x)/Sq
rt[d]])/(Sqrt[d]*Sqrt[e]) + ((I/2)*b*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*Sqrt[e])

________________________________________________________________________________________

Rubi [A]  time = 0.0660322, antiderivative size = 105, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {205, 2324, 12, 4848, 2391} \[ -\frac{i b n \text{PolyLog}\left (2,-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} \sqrt{e}}+\frac{i b n \text{PolyLog}\left (2,\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} \sqrt{e}}+\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d} \sqrt{e}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(d + e*x^2),x]

[Out]

(ArcTan[(Sqrt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/(Sqrt[d]*Sqrt[e]) - ((I/2)*b*n*PolyLog[2, ((-I)*Sqrt[e]*x)/Sq
rt[d]])/(Sqrt[d]*Sqrt[e]) + ((I/2)*b*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*Sqrt[e])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2324

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c x^n\right )}{d+e x^2} \, dx &=\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d} \sqrt{e}}-(b n) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{d} \sqrt{e} x} \, dx\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d} \sqrt{e}}-\frac{(b n) \int \frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{\sqrt{d} \sqrt{e}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d} \sqrt{e}}-\frac{(i b n) \int \frac{\log \left (1-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{2 \sqrt{d} \sqrt{e}}+\frac{(i b n) \int \frac{\log \left (1+\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{x} \, dx}{2 \sqrt{d} \sqrt{e}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d} \sqrt{e}}-\frac{i b n \text{Li}_2\left (-\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} \sqrt{e}}+\frac{i b n \text{Li}_2\left (\frac{i \sqrt{e} x}{\sqrt{d}}\right )}{2 \sqrt{d} \sqrt{e}}\\ \end{align*}

Mathematica [A]  time = 0.0465185, size = 107, normalized size = 1.02 \[ \frac{b n \text{PolyLog}\left (2,\frac{\sqrt{e} x}{\sqrt{-d}}\right )-b n \text{PolyLog}\left (2,\frac{d \sqrt{e} x}{(-d)^{3/2}}\right )+\left (\log \left (\frac{\sqrt{e} x}{\sqrt{-d}}+1\right )-\log \left (\frac{d \sqrt{e} x}{(-d)^{3/2}}+1\right )\right ) \left (-\left (a+b \log \left (c x^n\right )\right )\right )}{2 \sqrt{-d} \sqrt{e}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(d + e*x^2),x]

[Out]

(-((a + b*Log[c*x^n])*(Log[1 + (Sqrt[e]*x)/Sqrt[-d]] - Log[1 + (d*Sqrt[e]*x)/(-d)^(3/2)])) + b*n*PolyLog[2, (S
qrt[e]*x)/Sqrt[-d]] - b*n*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/(2*Sqrt[-d]*Sqrt[e])

________________________________________________________________________________________

Maple [C]  time = 0.22, size = 332, normalized size = 3.2 \begin{align*} -{\ln \left ( x \right ) bn\arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}}+{b\ln \left ({x}^{n} \right ) \arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}}+{\frac{\ln \left ( x \right ) bn}{2}\ln \left ({ \left ( -ex+\sqrt{-de} \right ){\frac{1}{\sqrt{-de}}}} \right ){\frac{1}{\sqrt{-de}}}}-{\frac{\ln \left ( x \right ) bn}{2}\ln \left ({ \left ( ex+\sqrt{-de} \right ){\frac{1}{\sqrt{-de}}}} \right ){\frac{1}{\sqrt{-de}}}}+{\frac{bn}{2}{\it dilog} \left ({ \left ( -ex+\sqrt{-de} \right ){\frac{1}{\sqrt{-de}}}} \right ){\frac{1}{\sqrt{-de}}}}-{\frac{bn}{2}{\it dilog} \left ({ \left ( ex+\sqrt{-de} \right ){\frac{1}{\sqrt{-de}}}} \right ){\frac{1}{\sqrt{-de}}}}+{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}\arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}}-{{\frac{i}{2}}b\pi \,{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) \arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}}-{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}\arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}}+{{\frac{i}{2}}b\pi \, \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) \arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}}+{b\ln \left ( c \right ) \arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}}+{a\arctan \left ({ex{\frac{1}{\sqrt{de}}}} \right ){\frac{1}{\sqrt{de}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/(e*x^2+d),x)

[Out]

-b/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*n*ln(x)+b/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*ln(x^n)+1/2*b*n/(-d*e)^(1
/2)*ln(x)*ln((-e*x+(-d*e)^(1/2))/(-d*e)^(1/2))-1/2*b*n/(-d*e)^(1/2)*ln(x)*ln((e*x+(-d*e)^(1/2))/(-d*e)^(1/2))+
1/2*b*n/(-d*e)^(1/2)*dilog((-e*x+(-d*e)^(1/2))/(-d*e)^(1/2))-1/2*b*n/(-d*e)^(1/2)*dilog((e*x+(-d*e)^(1/2))/(-d
*e)^(1/2))+1/2*I/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I/(d*e)^(1/2)*arctan
(x*e/(d*e)^(1/2))*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*b*Pi*csgn
(I*c*x^n)^3+1/2*I/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*b*Pi*csgn(I*c*x^n)^2*csgn(I*c)+1/(d*e)^(1/2)*arctan(x*e/
(d*e)^(1/2))*b*ln(c)+a/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(e*x^2+d),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b \log \left (c x^{n}\right ) + a}{e x^{2} + d}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)/(e*x^2 + d), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \log{\left (c x^{n} \right )}}{d + e x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/(e*x**2+d),x)

[Out]

Integral((a + b*log(c*x**n))/(d + e*x**2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \log \left (c x^{n}\right ) + a}{e x^{2} + d}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/(e*x^2+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/(e*x^2 + d), x)